package com.zhangliuliu.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhangliuliu.bean.AreaBean;
import com.zhangliuliu.bean.ConsultBean;

import java.time.LocalDate;
import java.util.List;

@TableName("event")
public class EventBean {
    /**
     * 事件记录
     */

    @TableId(value = "pk_eventId",type = IdType.AUTO)
    private int eventId;

    @TableField("event_name")
    private String eventName;


    @TableField("event_time")
    private LocalDate time=LocalDate.now();

    @TableField("harm_type")
    private String harmType;
    @TableField("event_stage")
    private String stage;
    @TableField("event_describe")
    private String describe;
    @TableField("event_find")
    private String findType;

    @TableField("event_lose")
    private String lose;
    @TableField("event_pic")
    private String eventPicture;
    @TableField("event_plan")
    //防治方案
    private String plan;
    //专家建议
    private String advise;
    //所在区域

    @TableField(exist = false)
    private AreaBean areaBean;
    //会商信息
    @TableField(exist = false)
    private List<ConsultBean> list;

    public EventBean() {
    }

    public EventBean(String eventName, LocalDate time, String harmType, String stage,
                     String describe, String findType, String lose, String eventPicture, String plan,int areaId) {
        this.eventName = eventName;
        this.time = time;
        this.harmType = harmType;
        this.stage = stage;
        this.describe = describe;
        this.findType = findType;
        this.lose = lose;
        this.eventPicture = eventPicture;
        this.plan = plan;
        this.areaBean=new AreaBean();
        this.areaBean.setAreaId(areaId);
    }

    public int getEventId() {
        return eventId;
    }

    public void setEventId(int eventId) {
        this.eventId = eventId;
    }

    public String getEventName() {
        return eventName;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    public String getEventPicture() {
        return eventPicture;
    }

    public void setEventPicture(String eventPicture) {
        this.eventPicture = eventPicture;
    }

    public LocalDate getTime() {
        return time;
    }

    public void setTime(LocalDate time) {
        this.time = time;
    }

    public String getHarmType() {
        return harmType;
    }

    public void setHarmType(String harmType) {
        this.harmType = harmType;
    }

    public String getStage() {
        return stage;
    }

    public void setStage(String stage) {
        this.stage = stage;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getFindType() {
        return findType;
    }

    public void setFindType(String findType) {
        this.findType = findType;
    }

    public AreaBean getAreaBean() {
        return areaBean;
    }

    public void setAreaBean(AreaBean areaBean) {
        this.areaBean = areaBean;
    }

    public String getLose() {
        return lose;
    }

    public void setLose(String lose) {
        this.lose = lose;
    }

    public String getPlan() {
        return plan;
    }

    public void setPlan(String plan) {
        this.plan = plan;
    }

    public String getAdvise() {
        return advise;
    }

    public void setAdvise(String advise) {
        this.advise = advise;
    }

    public List<ConsultBean> getList() {
        return list;
    }

    public void setList(List<ConsultBean> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "EventBean{" +
                "eventId=" + eventId +
                ", eventName='" + eventName + '\'' +
                ", eventPicture='" + eventPicture + '\'' +
                ", time=" + time +
                ", harmType='" + harmType + '\'' +
                ", stage='" + stage + '\'' +
                ", describe='" + describe + '\'' +
                ", findType='" + findType + '\'' +
                ", areaBean=" + areaBean +
                ", lose='" + lose + '\'' +
                ", areas='" + areaBean + '\'' +
                ", plan='" + plan + '\'' +
                ", list=" + list +
                '}';
    }
}
